<template>
    <div class="rencai_main ">
        
        <img v-if="data.files.length!=0" :src="data.files[0].url" alt="" />
        <el-empty style=" width: 100%;height: 230px;" v-else description="暂无图片"/>
        <div class="rencai_mains flex jcsb">
            <p class="fontz fonts20">{{ data.trainingTitle }}</p>
            <div class="rencai_mains_bottom flex jcsb aic">
                <span class="rencai_mains_bottom_span fonts18 fontz">{{ data.trainingSource }}</span>
                <span class="fonts18 fontz">浏览量：{{ data.viewNumber||0 }}</span>
            </div>
        </div>
    </div>
</template>
  
<script>
export default {
    name: 'RencaiMain',
    props:["data","index"],
    data() {
        return {
        }
    },
    methods: {
        classClick(item) {
            this.indexValue = item.id
        }
    }
}
</script>
  
<style scoped lang="scss">
.rencai_main {
    img {
        width: 100%;
        height: 230px;
    }

    .rencai_mains {
        flex-direction: column;
        padding: 16px 20px 28px 20px;
        background: #F8F9FA;
        span{
            color: #ADAFB3;
        }
        .rencai_mains_bottom{
            margin-top: 17px;
        }
        .rencai_mains_bottom_span {
            padding:2px 14px;
            height: 26px;
            background: #EAEDF1;
            border-radius: 15px 15px 15px 15px;
            opacity: 1;
        }
    }
}
</style>
  